home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pango-1.0 / pango / pangofc-decoder.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  3.7 KB  |  111 lines

  1. /* Pango
  2.  * pangofc-decoder.h: Custom encoders/decoders on a per-font basis.
  3.  *
  4.  * Copyright (C) 2004 Red Hat Software
  5.  * 
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __PANGO_DECODER_H_
  23. #define __PANGO_DECODER_H_
  24.  
  25. #include <pango/pangofc-font.h>
  26.  
  27. G_BEGIN_DECLS
  28.  
  29. #define PANGO_TYPE_FC_DECODER       (pango_fc_decoder_get_type())
  30. #define PANGO_FC_DECODER(object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder))
  31. #define PANGO_IS_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
  32.  
  33. typedef struct _PangoFcDecoder      PangoFcDecoder;
  34. typedef struct _PangoFcDecoderClass PangoFcDecoderClass;
  35.  
  36. #define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
  37. #define PANGO_IS_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
  38. #define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
  39.  
  40. /**
  41.  * PangoFcDecoder:
  42.  *
  43.  * #PangoFcDecoder is a virtual base class that implementations will
  44.  * inherit from.  It's the interface that is used to define a custom
  45.  * encoding for a font.  These objects are created in your code from a
  46.  * function callback that was originally registered with
  47.  * pango_fc_font_map_add_decoder_find_func().  Pango requires
  48.  * information about the supported charset for a font as well as the
  49.  * individual character to glyph conversions.  Pango gets that
  50.  * information via the #get_charset and #get_glyph callbacks into your
  51.  * object implementation.
  52.  *
  53.  * Since: 1.6
  54.  **/
  55. struct _PangoFcDecoder
  56. {
  57.   /*< private >*/
  58.   GObject parent_instance;
  59. };
  60.  
  61. /**
  62.  * PangoFcDecoderClass:
  63.  * @get_charset: This returns an #FcCharset given a #PangoFcFont that
  64.  *  includes a list of supported characters in the font.  The
  65.  *  #FcCharSet that is returned should be an internal reference to your
  66.  *  code.  Pango will not free this structure.  It is important that
  67.  *  you make this callback fast because this callback is called
  68.  *  separately for each character to determine Unicode coverage.
  69.  * @get_glyph: This returns a single #PangoGlyph for a given Unicode
  70.  *  code point.
  71.  *
  72.  * Class structure for #PangoFcDecoder.
  73.  *
  74.  * Since: 1.6
  75.  **/
  76. struct _PangoFcDecoderClass
  77. {
  78.   /*< private >*/
  79.   GObjectClass parent_class;
  80.  
  81.   /* vtable - not signals */
  82.   /*< public >*/
  83.   FcCharSet  *(*get_charset) (PangoFcDecoder *decoder,
  84.                   PangoFcFont    *fcfont);
  85.   PangoGlyph  (*get_glyph)   (PangoFcDecoder *decoder,
  86.                   PangoFcFont    *fcfont,
  87.                   guint32         wc);
  88.  
  89.   /*< private >*/
  90.   
  91.   /* Padding for future expansion */
  92.   void (*_pango_reserved1) (void);
  93.   void (*_pango_reserved2) (void);
  94.   void (*_pango_reserved3) (void);
  95.   void (*_pango_reserved4) (void);
  96. };
  97.  
  98. GType      pango_fc_decoder_get_type    (void);
  99.  
  100. FcCharSet *pango_fc_decoder_get_charset (PangoFcDecoder *decoder,
  101.                      PangoFcFont    *fcfont);
  102.  
  103. PangoGlyph pango_fc_decoder_get_glyph   (PangoFcDecoder *decoder,
  104.                      PangoFcFont    *fcfont,
  105.                      guint32         wc);
  106.  
  107. G_END_DECLS
  108.  
  109. #endif /* __PANGO_DECODER_H_ */
  110.  
  111.